import request from "@/utils/request";

// 考试管理模块Api
// ----------------------------------------------
// 题库信息子模块数据请求，题库信息子模块数据请求，题库信息子模块数据请求

// 试题列表数据列表
export const GetquestionList = (params) => {
    return request({
        url: "/exam/question",
        params,
    });
};
// 获取单个试题信息
export const GetOnquestionList = (id) => {
    return request({
        url: `/exam/question/${id}`,
    });
};

// 试题列表信息增加新增
export const PostquestionrApi = (data) => {
    return request({
        url: "/exam/question",
        method: "POST",
        data,
    });
};

// 试题列表修改试题信息
export const StatequestionApi = (data) => {
    return request({
        url: `/exam/question/${data.id}`,
        method: "PUT",
        data,
    });
};

// 试题列表修  题目上下架
export const ShowquestionrApi = (data) => {
    return request({
        url: `/exam/question/show`,
        method: "POST",
        data,
    });
};

// 试题列表修题目审核
export const CheckquestionrApi = (data) => {
    return request({
        url: `/exam/question/check`,
        method: "POST",
        data,
    });
};

// 试题删除
export const delquestionListApi = (id) => {
    return request({
        url: `/exam/question/${id}`,
        method: "DELETE",
    });
};

// 获取树数据
export const getTreeListApi = () => {
    return request({
        url: "/subject/tree",
    });
};

// 获取目录列表数据
export const getMenuListApi = () => {
    return request({
        url: "/subject/directory",
    });
};

// 获取标签列表数据
export const getTagListApi = () => {
    return request({
        url: "/subject/tag",
    });
};
